package com.yanqu.road.server.cmd.group.rank;

import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manager.rank.CrossRankMgr;
import com.yanqu.road.server.connect.CrossAgentLinkedControl;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;
import io.netty.channel.ChannelHandlerContext;

/**
 * @author ：zfr
 * @date ：2021/9/15 18:59
 */
@Cmd(code = CrossProtocol.C_CROSS_RANK_UPLOAD_OVER_SYNC, desc = "同步通知榜单上传完成")
public class CrossSyncRankDataUploadOverCmd implements Command {

    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        long serverId = CrossAgentLinkedControl.getLinkedClient(ctx).getServerId();
        CrossRankMgr.addUploadOverServer(serverId);
    }
}
